package com.mate.cloud.lottery.controller;


import com.mate.cloud.common.response.BaseResponse;
import com.mate.cloud.common.web.controller.AdminBaseController;
import com.mate.cloud.lottery.domain.LotteryRecord;
import com.mate.cloud.lottery.service.ILotteryRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author MI
 * @since 2025-01-24
 */
@RestController
@RequestMapping("/lottery-record")
public class LotteryRecordController extends AdminBaseController {


    @Autowired
    ILotteryRecordService lotteryRecordService;

    @GetMapping
    public BaseResponse<List<LotteryRecord>> records() {
        List<LotteryRecord> records = lotteryRecordService.list();
        return successBodyResponse(records);
    }
}
